<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%> 
<jsp:include page="main.jsp"></jsp:include>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<style type="text/css">
<!--
.p1{font-size:9pt;}
.p2{font-size:9pt;line-height:14pt;}
.p3{font-size:14.8px;}
.p4{font-size:14.9px;line-height:150%;}
a.lb:link,a.lb:visited{color:blue;}
a:hover,a.lb:hover{color:red;}
-->
</style> 
<script>
	function checkk(){
		var email = document.getElementById("email").value;
		var name = document.getElementById("name").value;
		var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
		var chkFlag = pattern.test(email);
		if(name==""){
			alert("姓名不能为空！");
			return false;
		} else 
		if(email==""){
			alert("邮箱不能为空！");
			return false;
		} else
		if(!chkFlag){
			alert("邮箱地址的格式不正确！");
			return false;
		}
		
	}
	function checka(){
		
		if((document.getElementsByName("id").checked)){
			alert("请选择要删除的人！");
			return false;
		}
	}
</script>
</head>

<body>

<table width="553" border="1" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="80" valign="top" bgcolor="84C342" class="p3"><div class="p2" align="center"></div>
      <span class="p3"></span><div class="p2" align="center"></div>
      <span class="p2"></span></td>
    <td width="80" align="right" valign="top" bgcolor="84C342" class="p3"><img src="image/h-1b.gif"  width="15" height="20"></td>
    <td width="6" valign="top" bgcolor="#FFFFFF" class="p2"><img src="image/h-1c.gif"  width="6" height="20"></td>
    <td width="587" align="right" valign="top" bgcolor="#FFFFFF" class="p2"> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="CECFCE">
        <tr> 
          <td width="14" valign="top" class="p4"><img src="image/h-1d.gif"  width="14" height="20"></td>
          <td width="507" align="center" class="p4">&nbsp;</td>
          <td width="52" height="27" align="center" class="p4">&nbsp;</td>
          <td width="14" align="right" valign="top" class="p4"><img src="image/h-1e.gif" width="11" height="10"></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="1" colspan="4" valign="top" class="p4">&nbsp; </td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td colspan="2" align="center" valign="top" bgcolor="84C342" class="p3"><div class="p2" align="center">
        
       
        <table width="140" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
          <tr> 
            <td bgcolor="B6DA90"> <table width="130" border="0" cellpadding="5" cellspacing="1">
                <tr bgcolor="#FFFFFF"> 
                  <td valign="middle" style="font-size:14px;" height="24px" bgcolor="#FFFFFF" class="66A623" align="left"><font color="66A623"><img src="image/icon00.gif"  width="13" height="13" /></font>
                  	<a href="AddressList.action?flag=f"  target="_top">朋友</a> (<s:property value="friend" />)
                  </td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td valign="middle" height="24px" class="p3" align="left"><font color="66A623"><img src="image/icon02.gif"  width="13" height="13" /></font>
                 	 <a href="AddressList.action?flag=r"  target="_top">亲人</a> (<s:property value="relation" />)
                 </td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td valign="middle" height="24px" class="p3" align="left"><font color="66A623"><img src="image/icon02.gif"  width="13" height="13" /></font>
                  	<a href="AddressList.action?flag=co">同事</a> (<s:property value="colleague" />)
                  </td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td valign="middle" height="24px" bgcolor="#FFFFFF" class="p3" align="left"><font color="66A623"><img src="image/icon02.gif"  width="13" height="13" /></font>
                  	<a href="AddressList.action?flag=n">网友</a> (<s:property value="netfriend" />)
                  </td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td valign="middle" height="24px" class="p3" align="left"><font color="66A623"><img src="image/icon02.gif" width="13" height="13" /></font>
                  	<a href="AddressList.action?flag=cm">常用联系人</a> (<s:property value="common" />)
                  </td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td valign="middle" height="24px" class="p3" align="left"><font color="66A623"><img src="image/icon02.gif"  width="13" height="13" /></font>
                  	<a href="AddressList.action?flag=o">其他</a> (<s:property value="other" />)
                  </td>
                </tr>      
              </table></td>
          </tr>
        </table>
        <br />
      </div>
      <table>
      	   <tr>
           	<td style="font-size:14px;"><a href="AddressAddS.action">新建联系人</a></td>
           </tr>
     </table>
      <div class="f12w" align="center" valign="top" style="line-height:150%;"> 
        <span class="p2"> 全国唯一24小时<br />
        <a href="mailto:kf163@188.com" target="_blank">免费邮箱客户服务</a><br />
        电话:020-83568090拨4
        </span>
        <span class="p3"><br />
        </span> 
        <span class="p2"></span></div></td>
    <td bgcolor="#FFFFFF" class="p2">&nbsp;</td>
    <td width="587" valign="top" bgcolor="#DCF4A7" class="p2">
    	
    	

    	<table width="587" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
        <tr> 
          <td align="center" bgcolor="#EADC45" class="p4">
          <form action="AddressDelete.action" method="post" onsubmit="return checka()">
          	<input type="hidden" name="flag" value="<s:property value='sign' />" />
          <table  width="100%"   border="0" cellpadding="0" cellspacing="0">
              <tr valign="top" height="20"> 
                <td width="293" bgcolor="EADC45"><strong> <img src="image/icon03.gif" width="10" height="11" /> 
                  <font size="3"><s:property value="call" /></font></strong></td>
              </tr>
              <tr valign="top"> 
              		<td  bgcolor="DCF4A7" align="left">
                      	<div style="border:1px;margin-left:30px;margin-top:20px;">
                      		&nbsp;&nbsp;&nbsp;&nbsp;姓名/昵称&nbsp;&nbsp; | &nbsp;&nbsp;邮件地址
                      	</div>
                    </td>
                    
               </tr>
	               <s:iterator value="list" status="index">
		               <tr valign="top"> 
		              		<td bgcolor="DCF4A7" align="left">
		                      	<div style="border:1px;margin-left:30px;margin-top:20px;">
		                      		<input type="checkbox" name="id" value="<s:property value='id' />" id="email" />&nbsp;&nbsp;&nbsp;&nbsp;
		                      		<s:property value="name" /> &nbsp;&nbsp; | &nbsp;&nbsp; <s:property value="email" />
		                      		&nbsp;&nbsp;&nbsp;&nbsp;
		                      		<a href='AddressUpdateSee.action?id=<s:property value="id" />&sign=<s:property value="sign" /> '>编辑</a>
		                      		&nbsp;&nbsp;&nbsp;&nbsp;<a href="write_box.jsp?sender=<s:property value='email' />">写信</a>
		                      	</div>
		                    </td>
		              </tr>
	             </s:iterator>
	             <s:if test="${allpage}!=0">
	             <tr valign="top">
	             	<td bgcolor="DCF4A7">
	             	<br />
	             	<font style="font-size:12px;color:red;"><s:property value="alarm" /></font>
	             		<br /><br />
	             		&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="删除" />
	             	</td>
	             </tr>
	             </s:if>
	             <s:else>
	             	<tr valign="top">
	             	<td bgcolor="DCF4A7" align="center">
	             		<br />
	             		您还没有建立该组！
	             	</td>
	             </tr>
	             </s:else>
            </table>
            </form>
            
      </table>
      <br />
      <s:if test="${allpage}!=0">
      <table align="center" width="320px">
			<tr>
				<td width="100px">
					第${page+1}页 共${allpage}页
				</td>
				<td width="50px">
					<a href="AddressList.action?page=0&flag=<s:property value='sign' />">首页</a>
				</td>
				<td width="60px">
					<s:if test="${page>0}">
						<a href="AddressList.action?page=${page-1}&flag=<s:property value='sign' />" >上一页</a>&nbsp;
					</s:if>
				</td>
				<td width="60px">
					<s:if test="${page+1<allpage}">
						<a href="AddressList.action?page=${page+1}&flag=<s:property value='sign' />">下一页</a>&nbsp;
					</s:if>
				</td>
				<td width="50px">
					<a href="AddressList.action?page=${allpage-1}&flag=<s:property value='sign' />">末页</a>
				</td>
		</table>
  	 </s:if>
   </td>
  </tr>
  <tr> 
    <td valign="bottom" bgcolor="84C342" class="p3">&nbsp;</td>
    <td align="right" valign="bottom" bgcolor="84C342" class="p3"><img src="image/h-2b.gif" width="15" height="16"></td>
    <td width="3" valign="bottom" bgcolor="#FFFFFF" class="p2"><img src="image/h-2c.gif" width="6" height="16"></td>
    <td width="587" valign="bottom" bgcolor="#FFFFFF" class="p2"><table width="587" height="27" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
        <tr> 
          <td height="2" colspan="3" align="center" bgcolor="#FFFFFF">&nbsp; </td>
        </tr>
        <tr> 
          <td width="15" valign="bottom" class="p4"><img src="image/h-2d.gif"  width="14" height="16"></td>
          <td width="557" align="center" class="p4">版权 &copy; 2009</td>
          <td width="15" align="right" valign="bottom" class="p4"><img src="image/h-2e.gif" width="10" height="10"></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>

</html>
